package com.xuecheng.content.agent;

import com.xuecheng.api.media.model.dto.MediaDTO;
import com.xuecheng.common.constant.XcFeignServiceNameList;
import com.xuecheng.common.domain.response.RestResponse;
import com.xuecheng.content.agent.fallback.MediaApiAgentFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author wz
 * @description:
 * @date 2021-12-16
 */
@FeignClient(value = XcFeignServiceNameList.XC_MEDIA_SERVICE, fallback = MediaApiAgentFallback.class)
public interface MediaApiAgent {

    String PRE_FIX = "/media/l/";

    @GetMapping(PRE_FIX + "media/{mediaId}")
    RestResponse<MediaDTO> getMediaById4s(@PathVariable Long mediaId);

}
